package fiter;

import javax.servlet.*;
import javax.servlet.annotation.*;
import java.io.IOException;

//字符编码过滤器
@WebFilter("/*")
public class FilterAll implements Filter {
    public void init(FilterConfig config) throws ServletException {
    }

    public void destroy() {
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {

        request.setCharacterEncoding("utf-8");
        response.setCharacterEncoding("utf-8");



            chain.doFilter(request, response);
    }
}
